<template>
	<view :style="themeColor">
		<view class="page">
			<view
				class="flex flex-wrap align-center justify-between benben-position-layout flex logisticsCheck_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }"
			>
				<view
					class='flex flex-wrap align-center logisticsCheck_fd0_0'
					@tap.stop="handleJumpDiy"
					data-type="back"
					data-url="1"
				>
					<image
						class='logisticsCheck_fd0_0_c0'
						mode="aspectFit"
						:src='STATIC_URL+"234.png"'
					></image>
				</view>
				<text
					class='logisticsCheck_fd0_1'
					style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;"
				>查看物流</text>
				<view class='flex flex-wrap align-center logisticsCheck_fd0_0'>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---查看物流-物流详情flex布局开始-->
			<view class="flex flex-direction align-stretch benben-flex-layout logisticsCheck_flex_1">
				<view class='flex flex-wrap align-center logisticsCheck_fd1_0'>
					<image
						class='logisticsCheck_fd1_0_c0'
						mode="aspectFit"
						:src='dataMessage.express_logo'
					></image>
					<view class='flex flex-direction align-stretch flex-sub'>
						<view class='flex align-center logisticsCheck_fd1_0_c1_c0'>
							<text style="font-family: Source Han Sans CN, Source Han Sans CN;">{{$t('订单编号：')}}</text>
							<!-- <text class='flex-sub'>{{order_sn}}</text> -->
							<input
							placeholder-style="font-family: Source Han Sans CN, Source Han Sans CN;"
								type="text"
								class='flex-sub'
								v-model="order_sn"
								disabled
							>
						</view>
						<view class='flex align-center logisticsCheck_fd1_0_c1_c1' style="font-family: Source Han Sans CN, Source Han Sans CN;">
							<text >{{$t('物流公司：')}}</text>
							<text>{{dataMessage.express_name}}</text>
						</view>
						<view class='flex align-center logisticsCheck_fd1_0_c1_c2' style="font-family: Source Han Sans CN, Source Han Sans CN;">
							<text>{{$t('物流单号：')}}</text>
							<input
							placeholder-style="font-family: Source Han Sans CN, Source Han Sans CN;"
								type="text"
								class='flex-sub'
								style="font-size: 24rpx;"
								v-model="dataMessage.logistics_no"
								disabled
							>
						</view>
					</view>
				</view>
				<view class='flex align-center logisticsCheck_fd1_1' style="font-family: Source Han Sans CN, Source Han Sans CN;">
					<view class='flex flex-wrap align-center logisticsCheck_fd1_1_c0'>
					</view>
					<text class='logisticsCheck_fd1_1_c1'>{{$t('物流详情')}}</text>
				</view>
				<template v-for='(item,key0) in dataMessage.express_info'>
					<view
						class='flex flex-direction align-stretch'
						:key='key0'
					>
						<view
							class='flex flex-direction align-stretch logisticsCheck_fd1_2_c0'
							v-if=" key0"
						>
							<view class='flex flex-wrap align-start'>
								<image
									class='logisticsCheck_fd1_2_c0_c0_c0'
									mode="aspectFit"
									:src='STATIC_URL+"723.png"'
								></image>
							</view>
							<view class='flex flex-direction align-stretch logisticsCheck_fd1_2_c0_c1'>
								<text
									class='flex-sub logisticsCheck_fd1_2_c0_c1_c0'
									style="color: #999999;font-family: Source Han Sans CN, Source Han Sans CN;"
								>{{item.AcceptStation}}</text>
								<text
									class='logisticsCheck_fd1_2_c0_c1_c1'
									style="color: #999999;font-family: Source Han Sans CN, Source Han Sans CN;"
								>{{item.AcceptTime}}</text>
							</view>
						</view>
						<view
							class='flex flex-direction align-stretch logisticsCheck_fd1_2_c0'
							v-else
						>
							<view class='flex flex-wrap align-start'>
								<image
									class='logisticsCheck_fd1_2_c0_c0_c0'
									mode="aspectFit"
									:src='STATIC_URL+"683.png"'
								></image>
							</view>
							<view class='flex flex-direction align-stretch logisticsCheck_fd1_2_c1_c1' style="font-family: Source Han Sans CN, Source Han Sans CN;">
								<text class='flex-sub logisticsCheck_fd1_2_c0_c1_c0'>{{item.AcceptStation}}</text>
								<text class='logisticsCheck_fd1_2_c0_c1_c1'>{{item.AcceptTime}}</text>
							</view>
						</view>
					</view>
				</template>

			</view>

			<!---查看物流-物流详情flex布局结束-->


		</view>
	</view>
</template>
<script>
	import { validate } from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				order_sn: "",
				"dataList": [],
				"dataMessage": {
					"Reason": "",
					"express_no": "",
					"ShipperCode": "",
					"logo": "",
					"OrderCode": "",
					"nu": "",
					"com": "",
					"status": "",
					"data": [],
					"goods_list": [],
					express_info: [],
					"sku_name": ""
				},
				"messageLenth": 0,
				"order_id": "",
				"order_goods_express_id": "",
				"id": "",
				ot: 1, // 1 普通商品【默认】  2 兑换商品
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let { order_id, order_goods_express_id, id } = options
			if (order_id !== undefined) this.order_id = order_id
			if (order_goods_express_id !== undefined) this.order_goods_express_id = order_goods_express_id
			if (id !== undefined) this.id = id
			this.ot = options.ot || 1;
			this.order_sn = options.order_sn;
			this.queryDetailsFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//订单-查看包裹详情
			async queryDetailsFunc() {
				//请求方法
				//数据验证

				var apiurl;
				if (this.ot == 1) apiurl = `/${this.apiFix}/6544e0ef73bf5`;
				else apiurl = `/${this.apiFix}/655618a96fa59`;

				let datadataMessage = await this.$api.post(apiurl, {
					order_id: this.order_id,
					order_goods_express_id: this.order_goods_express_id,
					order_sn: this.order_sn,
				});

				if (datadataMessage.data.code != 1) {
					this.$message.info(datadataMessage.data.msg);
					return
				}
				let infodataMessage = datadataMessage.data;
				this.dataMessage = infodataMessage.data
				this.messageLenth = (this.dataMessage.express_info || []).length;
			},
			//获取包裹列表
			async getListFunc() {
				//请求方法
				//数据验证

				let datadataList = await this.$api.post(global.apiUrls.post642181a3e9b7b, {
					order_id: this.order_id
				});

				if (datadataList.data.code != 1) {
					this.$message.info(datadataList.data.msg);
					return
				}
				let infodataList = datadataList.data;
				this.dataList = infodataList.data
			}
		}
	};
</script>
<style
	lang="scss"
	scoped
>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(https://www.guochaoxiaoju.com/uploads/mini/590.png) no-repeat;
		background-size: 100% auto;
	}

	.logisticsCheck_flex_0 {
		border-bottom: 1px solid rgba(230, 230, 230, 1);
		background: url(https://www.guochaoxiaoju.com/uploads/mini/590.png) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.logisticsCheck_fd0_1 {
		color: #000000;
		font-size: 40rpx;
		font-weight: 400;
		line-height: 50rpx;
	}

	.logisticsCheck_fd0_0_c0 {
		width: 20rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
	}

	.logisticsCheck_fd0_0 {
		width: 100rpx;
		height: 88rpx;
	}

	.logisticsCheck_flex_1 {
		background: var(--benbenbgColor1);
		padding: 0rpx 0rpx 32rpx 0rpx;
	}

	.logisticsCheck_fd1_2_c1_c1 {
		margin: 0rpx 0rpx 0rpx 12rpx;
		padding: 0rpx 0rpx 0rpx 37rpx;
	}

	.logisticsCheck_fd1_2_c0_c1_c1 {
		font-size: 24rpx;
		font-weight: 400;
		color: #333;
		line-height: 33rpx;
		margin: 16rpx 0rpx 80rpx 0rpx;
	}

	.logisticsCheck_fd1_2_c0_c1_c0 {
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		line-height: 40rpx;
		margin: -33rpx 0rpx 0rpx 0rpx;
	}

	.logisticsCheck_fd1_2_c0_c1 {
		border-left: 1px dashed rgba(221, 221, 221, 1);
		margin: 0rpx 0rpx 0rpx 12rpx;
		padding: 0rpx 0rpx 0rpx 37rpx;
	}

	.logisticsCheck_fd1_2_c0_c0_c0 {
		width: 26rpx;
		height: 26rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	.logisticsCheck_fd1_2_c0 {
		padding: 0rpx 24rpx 0rpx 24rpx;
	}

	.logisticsCheck_fd1_1_c1 {
		font-size: 32rpx;
		font-weight: 400;
		color: #333333;
		margin: 0rpx 0rpx 0rpx 24rpx;
		line-height: 45rpx;
	}

	.logisticsCheck_fd1_1_c0 {
		background: #AD3823;
		width: 6rpx;
		height: 30rpx;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		background-size: 100% auto !important;
	}

	.logisticsCheck_fd1_1 {
		border-bottom: 1px solid #eee;
		height: 109rpx;
		margin: 0rpx 24rpx 32rpx 24rpx;
	}

	.logisticsCheck_fd1_0_c1_c2 {
		font-size: 24rpx;
		font-weight: 400;
		color: #666666;
		line-height: 33rpx;
	}

	.logisticsCheck_fd1_0_c1_c1 {
		margin: 24rpx 0rpx 16rpx 0rpx;
		line-height: 33rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #666666;
	}

	.logisticsCheck_fd1_0_c1_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.logisticsCheck_fd1_0_c0 {
		width: 180rpx;
		height: 180rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.logisticsCheck_fd1_0 {
		padding: 24rpx;
	}
</style>